****************************************************************************
* File-Nale: 		chicago2006_us.do
* Date:		 04/30/2018
* Author: 		Fred Batista
* Purpose: 		individual level analyses of knowledge
* Data used: 		chicago2006_us.dta
* Data Output:	Journal of Politics� paper	*/
****************************************************************************

*Gender- PPGENDER
*Age- PPAGE
*Race-PPETHM
*Interest in US international relations - Q1
*Knowledge - Q600_C Q605_C
*Income - PPINCIMP
*Education - PPEDUC
*Employment Status - PPWORK
* Internet at home - PPNET
* underaged kids - PPT01 PPT25 PPT612 PP1317
* marital status - PPMARIT
*Weight - WEIGHT

* Recodes

gen man = 2 - PPGENDER

gen woman = 1 - man

gen age = PPAGE

gen age_sq = age*age

gen interest = Q1

recode interest (-1=.) )(1=3) (2=2) (3=1) (4=0)

gen income = PPINCIMP

gen education = PPEDUC

gen housewife = PPWORK

recode housewife (8=1) (else=0)

gen internet = PPNET

gen single = PPMARIT

recode single (2=1) (else=0)

gen children = PPT01 + PPT25 + PPT612 + PPT1317

gen weight = WEIGHT

* knowledge items

gen euro = Q600_C

recode euro (1=1) (else=0)

gen annan = Q605_C

recode annan (1=1) (else=0)

gen euro2 = Q600_C

recode euro2 (1=2) (2 3 95=1)  (98 99=0)

gen annan2 = Q605_C

recode annan2 (1=2) (2 95=1) (98 99=0)

* ANALYSES

***item analyses

* discrimination

alpha euro annan

* difficulty

summarize euro annan [aweight=weight]

*** Models

* Euro

khb probit euro man || income education age age_sq interest housewife children single [pweight=weight]

probit euro man income education age age_sq interest housewife children single [pweight=weight]

mlogit euro2 woman income education age age_sq interest housewife children single [pweight=weight], base(2)

* Koffi Annan

khb probit annan man || income education age age_sq interest housewife children single[pweight=weight]

probit annan man income education age age_sq interest housewife children single[pweight=weight]

mlogit annan2 woman income education age age_sq interest housewife children single [pweight=weight], base(2)
